Non-transitory computer-readable medium storing selected character specification program, selected character specification method, and selected character specification device

ABSTRACT

A non-transitory computer-readable medium storing a selected character specification program that causes a computer to execute a process including detecting a character region indicating a region, in which each character of the displayed character string is displayed on a screen, based on character string display information, specifying a stroke of a closed curved line designated on the screen based on input operation information, and specifying one or a plurality of successive characters, in which a ratio of an area of a selected region based on uppermost, lowermost, leftmost, and rightmost points of the stroke of the closed curved line in the character region to an area of the character region exceeds a threshold, as selected character among a respective character of the displayed character string overlapped with the stroke of the closed curved line.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2013-156560, filed on Jul. 29,2013, the entire contents of which are incorporated herein by reference.

FIELD

The embodiment discussed herein is related to a non-transitorycomputer-readable medium storing a selected character specificationprogram, a selected character specification method, and a selectedcharacter specification device.

BACKGROUND

On the display screens of terminals such as smart phones and tablets,electronic books or the like are, for example, displayed. Accordingly,there have been developed technologies to perform selection operationsand input operations on character strings displayed on screens based onthe touch devices of terminals (see, for example, Japanese PatentApplication Laid-open No. 2012-221367 and Japanese Patent ApplicationLaid-open No. 2010-130214).

Generally, methods of controlling one or a plurality of characters to beselected are based on character selection methods provided by operatingsystems (hereinafter referred to as OSs). Specifically, users selectobject character strings among those displayed on screens by, forexample, tracing or tapping the screens with fingers. Alternatively, theusers input character strings using software keyboards installed insmart phones or the like. In this manner, input characters arecontrolled to be selected.

Patent Literature 1: Japanese Patent Application Laid-open No.2012-221367

Patent Literature 2: Japanese Patent Application Laid-open No.2010-130214

SUMMARY

However, it is difficult to select object characters based on such atracing or tapping operation, and thus the erroneous selection ofcharacters is easily caused. On the other hand, software keyboards havesmall key areas for the input of characters, and thus the input ofcharacters with the software keyboards is difficult. In addition, anumber of key inputs may be required to fix desired characters for theinput of the characters, which makes the input operation complicated.Note that although methods of connecting hardware keyboards to terminalshave also been proposed, they may require time and effort.

Moreover, a character selection method provided by OSs is limited to thecommon character selection system of the OSs. Accordingly, in a case inwhich a more effective character selection method is used, applicationsmay be required to have the character selection method. Therefore, ithas been difficult to perform a more effective character selectionmethod in applications.

According to a first aspect of the embodiment, a non-transitorycomputer-readable medium storing a selected character specificationprogram that causes a computer to execute a process including detectinga character region indicating a region, in which each character of thedisplayed character string is displayed on a screen, based on characterstring display information including a position of a first character ofthe displayed character string, a character size of each character ofthe displayed character string, and space between lines of displayedcharacter strings, specifying a stroke of a closed curved linedesignated on the screen based on input operation information, andspecifying one or a plurality of successive characters, in which a ratioof an area of a selected region based on uppermost, lowermost, leftmost,and rightmost points of the stroke of the closed curved line in thecharacter region to an area of the character region exceeds a threshold,as selected character among a respective character of the displayedcharacter string overlapped with the stroke of the closed curved line.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating an example of the configuration of aselected character specification device according to the embodiment.

FIG. 2 is a diagram illustrating an example of the block diagram of theselected character specification device according to the embodiment.

FIG. 3A and FIG. 3B are diagrams each illustrating the status of aselected character specification program.

FIG. 4 is a diagram illustrating the outline of the selected characterspecification processing.

FIG. 5 is a diagram more specifically illustrating the outline of theselected character specification processing.

FIG. 6A and FIG. 6B are flowcharts for illustrating the flow of theprocessing of the selected character specification program PR.

FIG. 7 is a first diagram illustrating a specific example of characterstring display information.

FIG. 8 is a second diagram illustrating a specific example of characterstring display information.

FIG. 9 is a flowchart for illustrating the selected characterspecification processing (S14 of FIG. 6B).

FIG. 10 is a first flowchart for illustrating the details of theselected character specification processing in a case in which thestroke of a closed curved line is input.

FIG. 11 is a second flowchart for illustrating the details of theselected character specification processing according to the embodiment.

FIG. 12A and FIG. 12B are first diagrams each illustrating a specificexample of the stroke of a closed curved line and a selected region.

FIG. 13A to FIG. 13E are second diagrams each illustrating a specificexample of the stroke of a closed curved line and a selected region.

FIG. 14A to FIG. 14D are diagrams illustrating four examples of strokesother than a closed curved line.

FIG. 15 is a first flowchart for illustrating the details of theselected character specification processing in a case in which thestroke of a curved line or a broken line is input.

FIG. 16 is a second flowchart subsequent to the flowchart of FIG. 15.

FIG. 17 is a third flowchart subsequent to the flowchart of FIG. 16.

FIG. 18A and FIG. 18B are diagrams each illustrating a specific exampleof the stroke of a curved line or a broken line and a selected region.

FIG. 19 is a flowchart for illustrating the details of the selectedcharacter specification processing in a case in which a plurality ofstrokes is input.

FIG. 20A and FIG. 20B are diagrams each illustrating a specific exampleof a plurality of strokes and a selected region.

FIG. 21A and FIG. 21B are diagrams each illustrating another generationexample of a selected region.

FIG. 22 is a diagram illustrating the morpheme analysis processing of acharacter string.

FIG. 23 is a diagram illustrating a modified example of the selectedcharacter specification processing.

DESCRIPTION OF EMBODIMENTS

An embodiment of the present invention will be described below withreference to the drawings. It is to be noted that the technical scope ofthe present invention is not limited to the embodiment, and includesmatters described in the claims and their equivalents.

(Configuration of Selected Character Specification Device)

FIG. 1 is a diagram illustrating an example of the configuration of aselected character specification device according to the embodiment. Theselected character specification device in FIG. 1 represents, forexample, a terminal such as a smart phone and a tablet terminal. Theselected character specification device includes, for example, a display10, a ROM 11, a RAM 12, a communication interface 13, a centralprocessing unit (CPU) 14, a disk drive 15, or the like. The respectiveunits are capable of being connected to each other via a bus 17.

The communication interface 13 of the selected character specificationdevice in FIG. 1 controls communication processing with respect toexternal terminals or equipment. The display 10 represents, for example,the display screen of the terminal. The disk drive 15 controls the readprocessing and write processing of information with respect to a storagemedium 16. The read only memory (ROM) 11 stores the control program ofthe terminal or the like. The random access memory (RAM) 12 stores, forexample, a selected character specification program PR according to theembodiment. The CPU 14 performs selected character specificationprocessing according to the embodiment in cooperation with the selectedcharacter specification program PR.

(Block Diagram of Selected Character Specification Device)

FIG. 2 is a diagram illustrating an example of the block diagram of theselected character specification device according to the embodiment. Theselected character specification device according to the embodimentincludes, for example, a display unit 21, an input control unit 22, agraphics recognition unit 23, a selected character specification unit24, a morpheme analysis unit 25, a character string extraction unit 26,an information management unit 27, an information analysis unit 28, adocument analysis unit 29, a morpheme analysis unit 30, a storage unit31, and an output control unit 32.

The storage unit 31 controls, for example, the read processing and writeprocessing of information with respect to the storage medium 16 such asa hard disk and an SD card. The storage medium 16 stores characterstrings (hereinafter referred to as displayed character strings,character codes) to be displayed on the display screen of the terminaland stores graphics information, thresholds, or the like used in theselected character specification processing.

The document analysis unit 29 generates character string displayinformation based on displayed character strings read from the storageunit 31 and outputs the generated character string display informationto the output control unit 32 and the information management unit 27.The character string display information will be described later. Inaddition, the document analysis unit 29 causes the morpheme analysisunit 30 to generate the word-by-word-basis segment information ofdisplayed character strings and the information of the parts of speechof words and outputs the generated information to the output controlunit 32. The output control unit 32 controls the output of displayedcharacter strings to the display unit 21. The information managementunit 27 reads graphics information and a threshold from the storage unit31, acquires character string display information from the documentanalysis unit 29, and outputs the graphics information, the threshold,and the character string display information thus obtained to thegraphics recognition unit 23 and the selected character specificationunit 24.

The display unit 21 detects the input of a stroke designated on thescreen based on input operation information and outputs inputinformation to the input control unit 22. The stroke is input, forexample, by a finger or a stylus. The input control unit 22 outputs thecoordinate information of the stroke designated by the input informationto the graphics recognition unit 23, and the graphics recognition unit23 recognizes graphics information corresponding to the shape of thestroke and outputs the recognized graphics information to the selectedcharacter specification unit 24. The selected character specificationunit 24 specifies a selected character among one or a plurality ofselected candidate characters overlapped with the stroke in a displayedcharacter string and outputs the information (character code) of theselected character to the character string extraction unit 26.

The character string extraction unit 26 corrects the specified selectedcharacter based on the word-by-word-basis segment information generatedby the morpheme analysis unit 25 and outputs the information (charactercode) of the finally-fixed selected character to the informationanalysis unit 28. The information analysis unit 28 outputs theinformation of the finally-fixed selected character, the information ofthe difference between the specified selected character and thefinally-fixed selected character, or the like to the informationmanagement unit 27. Then, the information management unit 27 outputs theinformation of the finally-fixed selected character to the outputcontrol unit 32. The output control unit 32 controls the display colorand background color of the selected character on the screen. Thus, auser is allowed to detect the designation result of the stroke withrespect to the screen and the specified selected character.

(Status of Selected Character Specification Program)

FIG. 3A and FIG. 3B are diagrams each illustrating the status of aselected character specification program. FIG. 3A is a diagramillustrating the status of a general selected character specificationprogram. Generally, the character selection program of a terminal isprovided by, for example, an operating system (hereinafter referred toas an OS). That is, each application AP operating on an OS uses theinterface of a character selection program provided by an OS xw of eachplatform. Therefore, the function of the selected characterspecification processing of each application AP operating on an OS islimited to the function of a character selection program provided by anOS xw.

On the other hand, FIG. 3B is a diagram illustrating the status of theselected character specification program according to the embodiment.Here, the selected character specification program PR according to theembodiment is provided as, for example, middleware MD. The middleware MDrepresents software that mediates between an OS xw and each applicationAP. That is, each application AP operating on an OS is allowed to usethe interface of the selected character specification program PR in thelayer of the middleware MD. Thus, without being limited to the functionof a character selection program provided by an OS xw, each applicationAP is allowed to perform the selection processing of characters moreefficiently based on the selected character specification program PRaccording to the embodiment.

(Outline of Selected Character Specification Processing)

FIG. 4 is a diagram illustrating the outline of the selected characterspecification processing according to the embodiment. In the embodiment,a user surrounds the vicinity of one or a plurality of characters asselected objects in a displayed character string displayed on the screenof the terminal with a stroke sa of a closed curved line designated by ahand, a stylus, or the like. In this example, the character string “moten ki ga (in Japanese language expression)” j11 is surrounded with thestroke sa of the closed curved line. Then, the selected characterspecification program PR according to the embodiment specifies thecharacter string “ten ki (in Japanese language expression)” ff as aselected character in the character string “mo ten ki ga (in Japaneselanguage expression)” j11 overlapped with the stroke sa.

FIG. 5 is a diagram more specifically illustrating the outline of theselected character specification processing according to the embodiment.A table Hh in FIG. 5 is a table illustrating determination results as towhether each character in the character string “mo ten ki ga yo (inJapanese language expression)” j13. In addition, in FIG. 5, each dottedrectangle including each character in the character string “mo ten ki gayo (in Japanese language expression)” j13 represents a character regionEE.

The selected character specification program PR performs the selectedcharacter specification processing of each of the selected candidatecharacters “mo (in Japanese language expression)” j31, “ten (in Japaneselanguage expression)” j32, “ki (in Japanese language expression)” j33,and “ga (in Japanese language expression)” j34 overlapped with a strokesb. Specifically, the selected character specification program PRgenerates selected regions Ba to Bc based on, for example, theuppermost, lowermost, leftmost, and rightmost points of the stroke sb inthe character regions EE. Then, the selected character specificationprogram PR specifies the selected candidate characters as selectedcharacters when the ratios of the areas of the selected regions Ba to Bcto the corresponding character regions EE exceed a threshold.

In the example of FIG. 5, the ratios of the areas of the selectedregions Ba to Bc of the selected candidate characters “ten” j32, “ki”j33, and “ga” j34 among the selected candidate characters “mo” j31,“ten” j32, “ki” j33, and “ga” j34 to the corresponding character regionsEE exceed a threshold. Therefore, the selected character specificationprogram PR specifies the character string “ten ki ga (in Japaneselanguage expression)” j32, j33, j34 as selected characters. Note thatthe examples of FIG. 4 and FIG. 5 illustrate the cases in which thecharacters are selected by the strokes sa and sb of the closed curvedlines. However, characters may be selected by one or a plurality ofstokes of straight lines, curved lines, broken lines, or the like.Examples of one or a plurality of strokes of straight lines, curvedlines, broken lines, or the like will be described later.

Next, the processing of the selected character specification program PRaccording to the embodiment will be described based on flowcharts.

(Flowcharts: Processing of Selected Character Specification Program)

FIG. 6A and FIG. 6B are flowcharts for illustrating the flow of theprocessing of the selected character specification program PR accordingto the embodiment. FIG. 6A is a flowchart for illustrating thepre-processing of the selected character specification program PRaccording to the embodiment. Note that the processing of steps S1 and S2in the flowchart of FIG. 6A may be performed at the input of a stroke.

First, the selected character specification program PR extractscharacter string display information relating to a displayed characterstring and detects the character region of each character of thedisplayed character string (S1). The character region represents, forexample, the information of a region on a display screen on which eachcharacter is displayed. In addition, the character string displayinformation includes, for example, the information of the position ofthe first character, the character size, the space, or the like of thedisplayed character string. The selected character specification programPR is allowed to calculate the coordinates of the character region ofeach character in the displayed character string based on the characterstring display information. For example, the selected characterspecification program PR is allowed to calculate the coordinates of thecharacter region of the third character in the displayed characterstring by adding the widths of the first and second characters or theheights thereof to the coordinates of the first character.

Next, the selected character specification program PR generatesword-by-word-basis segment information based on the morpheme analysisprocessing of the displayed character string (S2). The morpheme analysisprocessing represents analysis processing in which a character string issegmented into words as minimum units and the part of speech of eachword is discriminated. For example, the character string “Tenki ga yoi(in Japanese language expression: It is a good weather (in Englishlanguage expression)” is segmented into the words of the noun “tennki(in Japanese language expression: weather (in English languageexpression)” the postposition “ga (in Japanese language expression)” andthe adjective “yoi (in Japanese language expression): good (in Englishlanguage expression)” The word-by-word-basis segment information is usedin the correction processing step (S15) of selected characters.

FIG. 6B is a flowchart for illustrating processing at the input of astroke in the selected character specification program PR according tothe embodiment. First, the start of inputting a stroke designated on ascreen based on input operation information is detected (S11). Next, theselected character specification program PR starts analyzing the stroke(S12). Then, the end of inputting the stroke is detected (S13).

Next, the selected character specification program PR performs thespecification processing of one or a plurality of successive selectedcharacters based on the stroke and character regions (S14). The detailsof the processing of step S14 will be described later based on anotherflowchart. Then, the selected character specification program PRperforms the correction processing of the specified selected charactersas corrected objects (S15). Specifically, in a case in which theselected characters include characters that do not constitute words atthe beginning or the end thereof, the selected character specificationprogram PR removes, for example, the characters that do not constitutewords. Next, the selected character specification program PR fixes thecorrected selected characters as selected characters (S16).

Specific Example Character String Display Information

FIG. 7 is a first diagram illustrating a specific example of characterstring display information. In this example, the displayed characterstring “Kyou ha Totemo Tenki ga Yoi desu. Ame ga Furisou . . . (inJapanese language expression): It is a very good weather today. It seemsto rain . . . (in English language expression)” j14 is illustrated.Although the character region EE of each of the characters “Kyou ha (inJapanese language expression)” j41 is illustrated in the example of FIG.7, the character regions EE of all the characters of the displayedcharacter string are detected in actual processing. Note that thedisplay direction of the displayed character string is detected inadvance. In addition, in this example, the size of each character of thedisplayed character string is uniform.

In the example of FIG. 7, the character string display informationincludes the information of the position of the first character of thedisplayed character string, the character size of the displayedcharacter string, and the space L1 between lines of the displayedcharacter string. The position information of the first characterrepresents, for example, coordinate information pc(x,y) of the firstcharacter on a display screen. In addition, the character size of thedisplayed character string represents, for example, a width W1 and aheight H1 of each character. Since the selected character specificationprogram PR is capable of calculating the character region of eachcharacter based on the character string display information, it may beunnecessary for the selected character specification program PR tomaintain the coordinate information of the character region of eachcharacter in advance. Thus, it is possible for the selected characterspecification program PR to reduce the amount of data to be maintained.

FIG. 8 is a second diagram illustrating a specific example of characterstring display information. In the example of FIG. 8, a displayedcharacter string includes decorated characters. The decorated charactersrepresent, for example, a character different in size from othercharacters, a ruby (kana reading), or the like. In the example of FIG.8, the character “ame (in Japanese language expression)” j15 is greaterin size, and the character “fu (in Japanese language expression)” j16has a ruby affixed thereto.

In the example of FIG. 8, the character string display informationincludes the information of the character sizes and spaces L2 and L3 ofthe decorated characters, besides the information of the position of thefirst character, the character size, and space L1 between lines of thedisplayed character string. Specifically, the character string displayinformation in FIG. 8 includes, as the character string displayinformation of the decorated characters, the information of a width W2,a height H2, and the space L2 of the character “ame (in Japaneselanguage expression)” j15 and the information of a width W3, a heightH3, and the space L3 of the ruby “fu (in Japanese language expression)”j16. Thus, even in a case in which the displayed character stringincludes the decorated characters, the selected character specificationprogram PR is allowed to detect the character region of each characterin the displayed character string based on the character string displayinformation.

Next, the selected character specification processing in step S14 of theflowchart of FIG. 6B will be more specifically described.

(Flowchart: Selected Character Specification Processing)

FIG. 9 is a flowchart for illustrating the selected characterspecification processing (S14 of FIG. 6B). First, the selected characterspecification program PR fixes one of characters overlapped with astroke as a selected candidate character (S21). Next, the selectedcharacter specification program PR calculates the area of the selectedregion of the selected candidate character based on the detected strokeand a character region (S22). Then, when the ratio of the area of theselected region to the area of the character region exceeds a threshold(YES in S23), the selected character specification program PR specifiesthe selected candidate character as a selected character (S24). Thedetails of the processing of steps S22 to S24 will be described laterbased on another flowchart.

On the other hand, when the ratio of the area of the selected region tothe area of the character region does not exceed the threshold (NO inS23), the selected character specification program PR determines whethera non-fixed selected candidate character exists (S25). When a non-fixedselected candidate character exists (YES in S25), the selected characterspecification program PR fixes a next selected candidate character(S21). When a non-fixed selected candidate character does not exist (NOin S25), the selected character specification program PR ends theselected character specification processing (S14 of FIG. 6B).

Next, the details of the processing of steps S22 to S24 in the flowchartof FIG. 9 will be described based on a flowchart. First, a descriptionwill be given of processing in which the input stroke is the stroke of aclosed curved line. When detecting the stroke of the closed curved line,the selected character specification program PR performs the processingof step S22 to S24 (FIG. 9) based on a next flowchart.

(Flowchart: Details of Selected Character Specification Processing(Stroke of Closed Curved Line))

FIG. 10 is a first flowchart for illustrating the details of theselected character specification processing according to the embodimentin a case in which the stroke of a closed curved line is input. Theprocessing of the flowchart of FIG. 10 corresponds to step S22 of FIG.9.

First, the selected character specification program PR determineswhether a stroke does not cross the four sides of the character regionof a selected candidate character and is entirely positioned inside thecharacter region (S31). When YES is determined in step S31, the selectedcharacter specification program PR stores the four apexes of the stroke,i.e., the coordinates of the uppermost, lowermost, leftmost, andrightmost points of the stroke (S32). Processing (3) subsequent to stepS32 will be described later based on another flowchart.

Next, when NO is determined in step S31, the selected characterspecification program PR further determines whether the stroke does notcross the four sides of the character region of the selected candidatecharacter and is entirely positioned outside the character region (S33).When YES is determined in step S33, the selected character specificationprogram PR stores the coordinates of each apex of the character regionof the selected candidate character (S34). The processing (3) subsequentto step S34 will be described later based on another flowchart. When NOis determined in step S33 (2), the selected character specificationprogram PR proceeds to a next flowchart.

FIG. 11 is a second flowchart for illustrating the details of theselected character specification processing according to the embodiment.The flowchart of FIG. 11 corresponds to steps S22 to S24 of FIG. 9.

When NO is determined in step S33 in the flowchart of FIG. 10, theselected character specification program PR subsequently determineswhether the stroke crosses one object side of the character region ofthe selected candidate character (S41). When the stroke crosses the side(YES in S41), the selected character specification program PR stores thecoordinates of each crossing point (S42). On the other hand, when thestroke does not cross the side (NO in S41), the selected characterspecification program PR determines whether the stroke is positionedoutside the object side of the character region of the selectedcandidate character (S43). When the stroke does not cross the objectside (NO in S41) and is positioned outside the object side (YES in S43),the selected character specification program PR stores the coordinatesof both ends of the object side (S44). On the other hand, when thestroke does not cross the object side (NO in S41) and is positionedinside the object side (NO in S43), the selected character specificationprogram PR stores the coordinates of the apex of the stroke positionedinside the object side (S45).

Next, the selected character specification program PR determines whetherall the sides of the character region of the selected candidatecharacter have been subjected to the processing of steps S41 to S45 asobject sides (S46). When all the sides have not been subjected to theprocessing of steps S41 to S45 (NO in step S46), the selected characterspecification program PR causes a non-selected side to be subjected tothe processing of steps S41 to S45. When all the sides have beensubjected to the processing of steps S41 to S45 (YES in S46) or as theprocessing subsequent to steps S32 and S34 in the flowchart of FIG. 10,the selected character specification program PR generates a polygonalregion, which is formed by connecting together the coordinates of twoadjacent points based on all the stored points, as a selected region andcalculates the area of the selected region (S47). An area S of thepolygonal region is calculated by, for example, the following formula 1.It is possible to calculate the area of the polygonal region with theuse of an exterior product from the position vector of each apex of thepolygonal region. In the following formula 1,(X_(k)−X_(k+1))(Y_(k)−Y_(k+1)) indicates a position vector in a case inwhich the apexes of the polygonal region are arranged in acounterclockwise direction.

$\begin{matrix}{\left( {{Formula}\mspace{14mu} 1} \right)\mspace{551mu}} & \; \\{S = {\frac{1}{2}{\sum\limits_{k = 1}^{n}{\left( {X_{k} - X_{k + 1}} \right)\left( {Y_{k} - Y_{k + 1}} \right)}}}} & {{formula}\mspace{14mu} 1}\end{matrix}$

Then, the selected character specification program PR determines whetherthe ratio of the area of the calculated selected region to the area ofthe character region exceeds a threshold (S48). When the ratio of thearea of the calculated selected region to the area of the characterregion exceeds the threshold (YES in S48), the selected characterspecification program PR specifies the selected candidate character as aselected character (S49). On the other hand, when the ratio is less thanthe threshold (NO in S48), the selected character specification programPR specifies the selected candidate character as a non-selectedcharacter (S50). Next, the selected character specification program PRperforms the processing of the flowcharts of FIG. 10 and FIG. 11 onundetermined selected candidate characters.

Specific Example Stroke of Closed Curved Line

FIG. 12A and FIG. 12B are first diagrams each illustrating a specificexample of the stroke of a closed curved line and a selected region.FIG. 12A and FIG. 12B are two case examples each illustrating the strokeof a closed curved line and a selected region.

Specific Example A

FIG. 12A illustrates an example of a case in which a stroke does notcross the four sides of the character region EE of the selectedcandidate character “mo (in Japanese language expression)” j121 and isentirely positioned inside the character region (YES in S31 of FIG. 10).Specifically, a stroke s1 does not cross the four sides of the characterregion EE of the selected candidate character “mo (in Japanese languageexpression)” j121 and is positioned inside the character region.Therefore, the coordinates of the uppermost, lowermost, leftmost, andrightmost points a11 to a14 of the stroke s1 are stored (S32). Then, apolygonal region A1-1 formed by connecting together the adjacent pointsof the coordinates based on the stored points a11 to a14 is calculatedas a selected region (S47). For example, when the ratio of the area ofthe selected region A1-1 to the area of the character region EE exceedsa threshold (YES in S48), the selected candidate character “mo (inJapanese language expression)” j121 is specified as a selected character(S49).

Specific Example B

FIG. 12B illustrates an example of a case in which a stroke does notcross the four sides of the character regions EE of selected candidatecharacters and is entirely positioned outside the character regions (YESin S33 of FIG. 10). Specifically, a stroke s2 does not cross the foursides of the character region EE of each of the selected candidatecharacters “ten (in Japanese language expression)” j122 and “ki (inJapanese language expression)” j123 and is positioned outside each ofthe character regions EE. Therefore, the coordinates of the apexes b11,b12, b15, and b16 of the character region EE of the selected candidatecharacter “ten (in Japanese language expression)” j122 and thecoordinates of the apexes b12 to b15 of the character region EE of theselected candidate character “ki (in Japanese language expression)” j123are stored (S34).

Then, a polygonal region B1-1 formed by connecting together the adjacentpoints of the coordinates based on the stored points b11, b12, b15, andb16 is calculated as the selected region of the selected candidatecharacter “ten (in Japanese language expression)” j122 (S47). Inaddition, a polygonal region B1-2 formed by connecting together theadjacent points of the coordinates based on the points b12 to b15 iscalculated as the selected region of the selected candidate character“ki (in Japanese language expression)” j123 (S47). Similarly, when theratios of the areas of the selected regions B1-1 and B1-2 to the areasof the character regions EE exceed a threshold (YES in S48), thecorresponding selected candidate characters are specified as selectedcharacters (S49).

FIG. 13A to FIG. 13E are second diagrams each illustrating a specificexample of the stroke of a closed curved line and a selected region.FIG. 13A to FIG. 13D are four case examples each illustrating the strokeof a closed curved line and a selected region.

Specific Example A

FIG. 13A illustrates an example of a case in which a stroke s3 crossesone or more object sides of the character regions EE of selectedcandidate characters (YES in S41 of FIG. 11) and a case in which thestroke s3 is positioned outside the object sides of the characterregions EE of the selected candidate characters (YES in S43 of FIG. 11).

Specifically, the stroke s3 crosses the upper, left, and right sides ofthe character region EE of the selected candidate character “ten (inJapanese language expression)” j131 (YES in S41). Therefore, crossingpoints a21, a22, a28, and a29 between the stroke s3 and the upper, left,and right sides are stored (S42). In addition, the stroke s3 ispositioned outside the lower side of the character region EE of theselected candidate character “ten (in Japanese language expression)”j131 (YES in S43). Therefore, the coordinates of points a23 and a27 ofboth ends of the lower side are stored (S44). Then, a polygonal regionA2-1 formed by connecting together the adjacent points of thecoordinates based on the stored points a21 to a23 and the points a27 toa29 is calculated as a selected region.

Similarly, the stroke s3 crosses the left and right sides of thecharacter region EE of the selected candidate character “ki (in Japaneselanguage expression)” j132 (YES in S41). Therefore, crossing points a24and a26 between the stroke s3 and the left and right sides are stored(S42). In addition, since the stroke s3 is positioned outside the upperside of the character region EE of the selected candidate character “ki(in Japanese language expression)” j132 (YES in S43), the coordinates ofpoints a23 and a27 of both ends of the upper side are stored (S44).Moreover, since the stroke s3 is positioned inside the lower side of thecharacter region EE of the selected candidate character “ki (in Japaneselanguage expression)” j132 (NO in S43), the coordinates of an apex a25of the stroke s3 positioned inside the lower side are stored (S45).Then, a polygonal region A2-2 formed by connecting together the adjacentpoints of the coordinates based on the stored points a23 to a27 iscalculated as a selected region.

Specific Example B

In FIG. 13B, a stroke s4 crosses the lower side of the character regionEE of the selected candidate character “ten (in Japanese languageexpression)” j133 (YES in S41) and is positioned inside the upper, left,and right sides of the character region EE thereof (NO in S43).Therefore, a polygonal region B2-1 formed by connecting togetheradjacent points based on crossing points b22 and b24 between the strokes4 and the lower side and apexes b21, b22, and b24 of the stroke s4positioned inside the upper, left, and right sides is calculated as aselected region. In this example, the apex b22 of the stroke s4positioned inside the left side and the apex b24 of the stroke s4positioned inside the right side are the same as the crossing points b22and b24 between the stroke s4 and the lower side.

In FIG. 13B, the stroke s4 crosses the upper side of the characterregion EE of the selected candidate character “ki (in Japanese languageexpression)” j134 (YES in S41) and is positioned inside the left, right,and lower sides of the character region EE thereof (NO in S43).Therefore, a polygonal region B2-2 formed by connecting togetheradjacent points based on the crossing points b22 and b24 between thestroke s4 and the upper side and the apexes b22 to b24 of the stroke s4positioned inside the left, right, and lower sides is calculated as aselected region.

Specific Example C

In FIG. 13C, a stroke s5 crosses the upper, left, and right sides of thecharacter region EE of the selected candidate character “ten (inJapanese language expression)” j135 (YES in S41) and is positionedoutside the lower side of the character region EE thereof (YES in S43).Therefore, a polygonal region C2-1 formed by connecting togetheradjacent points based on crossing points c21, c22, and c28 between thestroke s5 and the upper, left, and right sides and apexes c23 and c27 ofboth ends of the lower side is calculated as a selected region. Inaddition, the stroke s5 crosses the left, right, and lower sides of thecharacter region EE of the selected candidate character “ki (in Japaneselanguage expression)” j136 (YES in S41) and is positioned outside theupper side thereof (YES in S43). Therefore, a polygonal region C2-2formed by connecting together adjacent points based on crossing pointsc24, c26, and c25 between the stroke s5 and the left, right, and lowersides and the apexes c23 and c27 of both ends of the upper side iscalculated as a selected region.

Specific Example D

In FIG. 13D, a polygonal region D2-1 formed based on crossing points d22and d26 between a stroke s6 and the left and right sides of thecharacter region EE of the selected candidate character “ten (inJapanese language expression)” j137 an apex d21 of the stroke s6positioned inside the upper side thereof, and points d23 and d25 of bothends of the lower side thereof is calculated as a selected region. Inaddition, a polygonal region D2-2 based on crossing points d23 and d25between the stroke s6 and the left and right sides of the characterregion EE of the selected candidate character “ki (in Japanese languageexpression)” j138 and an apex d24 of the stroke s6 positioned inside thelower side thereof is calculated as a selected region.

As described above, for each character of a displayed character stringoverlapped with the stroke of a closed curved line, the selectedcharacter specification program PR according to the embodimentgenerates, as a selected region, the overlapped region between acharacter region and a polygonal region formed by connecting togetherthe uppermost, lowermost, leftmost, and rightmost points of the strokeof the closed curved line in the character region. Then, the selectedcharacter specification program PR specifies one or a plurality ofsuccessive characters, in which the ratio of the area of a selectedregion to the area of a character region exceeds a threshold, asselected characters.

Thus, the selected character specification program PR makes it possibleto easily specify one or a plurality of successive selected charactersbased on the stroke of a closed curved line. In addition, even in a casein which a character is selected by a closed curved line likely to beoverlapped with an undesired character, the selected characterspecification program PR specifies a selected character based on theratio of the area of a selected region to the area of a characterregion. In this manner, the selected character specification program PRis allowed to specify only a desired character as a selected character.Thus, a user is allowed to efficiently select one or a plurality ofsuccessive characters more intuitively and more accurately based on thestroke of a closed curved line that facilitates the imagination of acorresponding area region.

(Another Generation Example of Selected Region)

In the embodiment, the selected character specification program PRgenerates a selected region based on the uppermost, lowermost, leftmost,and rightmost points of a closed curved line in a character region andthe apexes of the character region. However, the generation of aselected region is not limited to this example. As illustrated in FIG.13E, the selected character specification program PR may generate, as aselected region E2-1, the overlapped region between character regionsand an internal region inscribed in the uppermost, lowermost, leftmost,and rightmost points of a closed curved line (S22 in FIG. 9). Then,among the characters of a displayed character string, the selectedcharacter specification program PR specifies one or a plurality ofsuccessive characters, in which the ratio of the area of the overlappedregion E2-1 between the character regions EE and the regioncorresponding to the closed curved line to the areas of the characterregions EE exceeds a threshold, as selected characters (S23 and S24 ofFIG. 9).

Next, a description will be given of the selected characterspecification processing in cases in which strokes other than a closedcurved line are input. First, specific examples of strokes other than aclosed curved line will be illustrated.

(Strokes Other than Closed Curved Line)

FIG. 14A to FIG. 14D are diagrams illustrating four examples of strokesother than a closed curved line. FIG. 14A illustrates an example of acase in which a stroke s11 of a meandering curved line (wavy line) isinput. FIG. 14B illustrates an example of a case in which a stroke s12of a broken line is input. As described above, a stroke may represent acurved line or a broken line. Since it is possible to input the strokeof a curved line or a broken line besides a closed curved line, a useris allowed to select a character based on a more intuitive operation.

FIG. 14C illustrates an example of a case in which strokes s13 of twoparallel straight lines are input. FIG. 14D illustrates an example of acase in which strokes s14 of two crossing straight lines are input. Asdescribed above, a stroke may include a plurality of lines. Note thatalthough the plurality of strokes of straight lines is illustrated inthis example, one or both of the lines may be curved lines, brokenlines, or the like. In addition, the plurality of strokes may representthree or more strokes.

Next, a description will be given of the selected characterspecification processing in a case in which one stroke, i.e., the strokeof a curved line or a broken line is input. The selected characterspecification program PR performs the selected character specificationprocessing based on the following flowchart in a case in which the shapeof a stroke is not a closed curved line but a curved line or a brokenline.

(Flowchart: Details of Selected Character Specification Processing(Stroke of Curved Line or Broken Line))

FIG. 15 is a first flowchart for illustrating the details of theselected character specification processing according to the embodimentin a case in which the stroke of a curved line or a broken line isinput. The processing of the flowchart of FIG. 15 corresponds to stepS22 of FIG. 9.

First, the selected character specification program PR acquires thecoordinates of the uppermost end of a stroke in the character region ofa selected candidate character (S61). Next, the selected characterspecification program PR determines whether the stroke is protruded inthe direction of the upper side of the character region (S62). That is,the selected character specification program PR determines whether thestroke crosses the upper side of the character region. When the strokeis protruded in the direction of the upper side of the character region(YES in S62), the selected character specification program PR stores thecoordinates of the crossing point between the stroke and the upper sideof the character region (S63). On the other hand, when the stroke is notprotruded in the direction of the upper side of the character region (NOin S62), the selected character specification program PR stores thecoordinates of the uppermost end of the stroke (S64).

Then, the selected character specification program PR acquires thecoordinates of the lowermost end of the stroke in the character regionof the selected candidate character (S65). Next, the selected characterspecification program PR determines whether the stroke is protruded inthe direction of the lower side of the character region (S66). That is,the selected character specification program PR determines whether thestroke crosses the lower side of the character region. When the strokeis protruded in the direction of the lower side of the character region(YES in S66), the selected character specification program PR stores thecoordinates of the crossing point between the stroke and the lower sideof the character region (S67). On the other hand, when the stroke is notprotruded in the direction of the lower side of the character region (NOin S66), the selected character specification program PR stores thecoordinates of the lowermost end of the stroke (S68).

FIG. 16 is a second flowchart for illustrating the details of theselected character specification processing according to the embodimentin a case in which the stroke of a curved line or a broken line isinput. The processing of the flowchart of FIG. 16 corresponds to stepS22 of FIG. 9.

Subsequent to the flowchart of FIG. 15, the selected characterspecification program PR acquires the coordinates of the leftmost end ofthe stroke in the character region of the selected candidate character(S71). Next, the selected character specification program PR determineswhether the stroke is protruded in the direction of the left side of thecharacter region (S72). That is, the selected character specificationprogram PR determines whether the stroke crosses the left side of thecharacter region. When the stroke is protruded in the direction of theleft side of the character region (YES in S72), the selected characterspecification program PR stores the coordinates of the crossing pointbetween the stroke and the left side of the character region (S73). Onthe other hand, when the stroke is not protruded in the direction of theleft side of the character region (NO in S72), the selected characterspecification program PR stores the coordinates of the leftmost end ofthe stroke (S74).

Then, the selected character specification program PR acquires thecoordinates of the rightmost end of the stroke in the character regionof the selected candidate character (S75). Next, the selected characterspecification program PR determines whether the stroke is protruded inthe direction of the right side of the character region (S76). That is,the selected character specification program PR determines whether thestroke crosses the right side of the character region. When the strokeis protruded in the direction of the right side of the character region(YES in S76), the selected character specification program PR stores thecoordinates of the crossing point between the stroke and the right sideof the character region (S77). On the other hand, when the stroke is notprotruded in the direction of the right side of the character region (NOin S76), the selected character specification program PR stores thecoordinates of the rightmost end of the stroke (S78).

FIG. 17 is a third flowchart for illustrating the details of theselected character specification processing according to the embodimentin a case in which the stroke of a curved line or a broken line isinput. The processing of the flowchart of FIG. 17 corresponds to stepsS22 to S24 of FIG. 9.

Subsequent to the flowchart of FIG. 16, the selected characterspecification program PR stores the coordinates of the four apexes ofthe character region of the selected candidate character (S81). Next,the selected character specification program PR generates a polygonalregion, which is formed by connecting together two adjacent coordinatesbased on all the stored points, as a selected region and calculates thearea of the selected region (S82). All the stored points include, forexample, the apexes of the stroke, the crossing points between thestroke and the character region, the four apexes of the characterregion, or the like. As described above, the area of the polygonalregion may be calculated based on the above formula 1.

Next, the selected character specification program PR determines whetherthe ratio of the area of the calculated selected region to the area ofthe character region exceeds a threshold (S83). When the ratio of thearea of the calculated selected region to the area of the characterregion exceeds the threshold (YES in S83), the selected characterspecification program PR specifies the selected candidate character as aselected character (S84). On the other hand, when the ratio is less thanthe threshold (NO in S83), the selected character specification programPR specifies the selected candidate character as a non-selectedcharacter (S85). Then, the selected character specification program PRperforms the processing of the flowcharts of FIG. 15 to FIG. 17 onundetermined selected candidate characters.

Specific Example Stroke of Curved Line or Broken Line

FIG. 18A and FIG. 18B are diagrams each illustrating a specific exampleof the stroke of a curved line or a broken line and a selected region.FIG. 18A and FIG. 18B are two case examples each illustrating the strokeof a curved line or a broken line and a selected region.

Specific Example A

In the example of FIG. 18A, since a stroke s11 does not cross the upperside of the character region of the selected candidate character “ten(in Japanese language expression)” j181 (NO in S62 of FIG. 15), thecoordinates of a point a32 of the uppermost end of the stroke s11 arestored (S64 of FIG. 15). In addition, since the stroke s11 crosses thelower side of the character region (YES in S66 of FIG. 15), thecoordinates of a crossing point a29 between the stroke s11 and the lowerside of the character region are stored (S67 of FIG. 15). Moreover,since the stroke s11 does not cross the left side of the characterregion (NO in S72 of FIG. 16), the coordinates of a point a22 of theleftmost end of the stroke s11 are stored (S74 of FIG. 16). In addition,since the stroke s11 does not cross the right side of the characterregion (NO in S76 of FIG. 16), the coordinates of a point a30 of therightmost end of the stroke s11 are stored (S78 of FIG. 16).

Then, a polygonal region A3-1 is generated as a selected region based onthe upper, lower, left, and right points a32, a29, a22, and a30 of thestroke s11 and apexes a21, a23, a28, and a31 of the character region.Specifically, the apex a21, the point a22 of the leftmost end, the apexa23, the apex a28, the point a30 of the rightmost end, the apex a31, thepoint a32 of the uppermost end, and the apex a21 are, for example,connected together. Since the point a29 of the lowermost end ispositioned on the extension of a line segment connecting the apexes a23and a28 together, it is omitted in this example.

Note that a method of generating a polygonal region based on a pluralityof points is not limited to this example. A polygonal region may begenerated based on the upper, lower, left, and right points a32, a29,a22, and a30 of the stroke s11 and the apexes a21, a23, a28, and a31 ofthe character region. In the embodiment, the selected characterspecification program PR generates a polygonal region by connectingtogether, for example, two adjacent points among object points.

Next, a description will be given of the selected candidate character“ki (in Japanese language expression)” j182 in the example of FIG. 18A.Since the stroke s11 crosses the upper side of the character region ofthe selected candidate character “ki (in Japanese language expression)”j182 (YES in S62 of FIG. 15), the coordinates of the crossing point a29between the stroke s11 and the upper side of the character region arestored (S63 of FIG. 15). In addition, since the stroke s11 crosses thelower side of the character region (YES in S66 of FIG. 15), thecoordinates of a crossing point a26 between the stroke s11 and the lowerside of the character region are stored (S67 of FIG. 15). Moreover,since the stroke s11 does not cross the left side of the characterregion (NO in 72 of FIG. 16), the coordinates of a point a24 of theleftmost end of the stroke s11 are stored (S74 of FIG. 16). In addition,since the stroke s11 does not cross the right side of the characterregion (NO in S76 of FIG. 16), the coordinates of the point a29 of therightmost end of the stroke s11 are stored (S78 of FIG. 16).

Then, a polygonal region A3-2 is generated as a selected region based onthe upper, lower, left, and right points a29, a26, and a24 of the strokes11 and the apexes a23, a25, a27, and a28 of the character region.Specifically, the apex a23, the point a24 of the leftmost end, the apexa25, the apex a27, the apex a28, and the apex a23 are, for example,connected together. Since the point a26 of the lowermost end ispositioned on the extension of a line segment connecting the apexes a25and a27 together, it is omitted in this example. In addition, since thepoint a29 is positioned on the extension of a line segment connectingthe apexes a28 and a23 together, it is omitted in this example.Moreover, since the point a29 of the uppermost end is the same as thepoint a29 of the rightmost end, the apex a27 is, for example, directlyconnected to the apex a28. The generation of the polygonal region is notlimited to this example, but it may be generated based on stored points.

Specific Example B

About the selected candidate character “ten (in Japanese languageexpression)” j183 in FIG. 18B, points b30, b22, and b29 are stored asthe upper, lower, left, and right points of a stroke s12. Then, apolygonal region B3-1 is generated as a selected region based on thepoints b30, b22, and b29 and apexes b21, b23, b28, and b31 of thecharacter region of the selected candidate character. Since the pointb29 of the lowermost end is positioned on the extension of a linesegment connecting the apexes b23 and b28 together, it is omitted inthis example. In addition, since the point b30 of the uppermost end isthe same as the point b30 of the rightmost end, the apex b31 is, forexample, directly connected to the apex b21 in this example. About theselected candidate character “ki (in Japanese language expression)” j184points b29, b24, and b27 are stored as the upper, lower, left, and rightpoints of the stroke s12. Then, a polygonal region B3-2 is generated asa selected region based on the points b29, b24, and b27 and apexes b23,b25, b26, and b28 of the character region of the selected candidatecharacter. Since the point b24 of the leftmost end is the same as thepoint b24 of the lowermost end, the apex b25 is, for example, directlyconnected to the apex b26 in this example.

As described above, the selected character specification program PRaccording to the embodiment generates, as a selected region, theoverlapped region between a character region and a polygonal regionformed by connecting together the uppermost, lowermost, leftmost, andrightmost points of one or a plurality of strokes in the characterregion and the apexes of the character region. Then, the selectedcharacter specification program PR specifies one or a plurality ofsuccessive characters, in which the ratio of the area of a selectedregion to the area of a character region exceeds a threshold, asselected characters.

Thus, the selected character specification program PR makes it possibleto easily specify one or a plurality of successive selected charactersbased on the stroke of a curved line or a broken line. In addition, evenin a case in which a character is selected by a closed curved linelikely to be overlapped with an undesired character, the selectedcharacter specification program PR specifies a selected character basedon the ratio of the area of a selected region to the area of a characterregion. In this manner, the selected character specification program PRis allowed to specify only a desired character as a selected character.Moreover, the selected character specification program PR generates aselected region based on a polygonal region formed by connectingtogether the uppermost, lowermost, leftmost, and rightmost points of astroke and the apexes of a character region. In this manner, theselected character specification program PR is allowed to generate awider selected region with a short stroke. Thus, a user is allowed toefficiently select one or a plurality of successive characters moreintuitively and more accurately based on the stroke of a curved line, abroken line, or the like.

Next, a description will be given of the selected characterspecification processing in a case in which a plurality of strokes isinput. The selected character specification program PR performs theselected character specification processing based on the followingflowchart when a plurality of strokes is designated on a screen based oninput operation information.

(Flowchart: Details of Selected Character Specification Processing(Plurality of Strokes))

FIG. 19 is a flowchart for illustrating the details of the selectedcharacter specification processing according to the embodiment in a casein which a plurality of strokes is input. The processing of theflowchart of FIG. 19 corresponds to step S22 of FIG. 9.

First, the selected character specification program PR acquires thecoordinates of the uppermost end of a stroke in the character region ofa selected candidate character (S91). Next, the selected characterspecification program PR determines whether the stroke is protruded inthe direction of the upper side of the character region (S92). That is,the selected character specification program PR determines whether thestroke crosses the upper side of the character region. When the strokeis protruded in the direction of the upper side of the character region(YES in S92), the selected character specification program PR stores thecoordinates of the crossing point between the stroke and the upper sideof the character region (S93). On the other hand, when the stroke is notprotruded in the direction of the upper side of the character region (NOin S92), the selected character specification program PR stores thecoordinates of the uppermost end of the stroke (S94).

Next, the selected character specification program PR determines whetherthe points of the uppermost ends of all of a plurality of strokes havebeen subjected to the determination processing (S91 to S94) (S95). Whenthe points of the uppermost ends of all the strokes have not beendetermined (NO in S95), the selected character specification program PRperforms the processing of steps S91 to S94 on the undetermined pointsof the uppermost ends of the strokes.

On the other hand, when the points of the uppermost ends of all thestrokes have been determined (YES in S95), the selected characterspecification program PR acquires the coordinates of the lowermost endof the stroke in the character region of the selected candidatecharacter (S96). Next, the selected character specification program PRdetermines whether the stroke is protruded in the direction of the lowerside of the character region (S97). That is, the selected characterspecification program PR determines whether the stroke crosses the lowerside of the character region. When the stroke is protruded in thedirection of the lower side of the character region (YES in S97), theselected character specification program PR stores the coordinates ofthe crossing point between the stroke and the lower side of thecharacter region (S98). On the other hand, when the stroke is notprotruded in the direction of the lower side of the character region (NOin S97), the selected character specification program PR stores thecoordinates of the lowermost end of the stroke (S99).

Next, the selected character specification program PR determines whetherthe points of the lowermost ends of all of a plurality of strokes havebeen subjected to the determination processing (S96 to S99) (S100). Whenthe points of the lowermost ends of all the strokes have not beendetermined (NO in S100), the selected character specification program PRperforms the processing of steps S96 to S99 on the undetermined pointsof the lowermost ends of the strokes. As described above, in a case inwhich a plurality of strokes is input, the uppermost and lowermostpoints of each of the strokes are stored. In this manner, the uppermost,lowermost, leftmost, and rightmost points of the strokes aresubstantially stored.

The subsequent processing is the same as that of the flowchart of FIG.17. That is, the selected character specification program PR stores thecoordinates of the four apexes of the character region of the selectedcandidate character (S81 of FIG. 17), generates a selected region byconnecting together two adjacent coordinates based on all the storedpoints, and calculates the area of the selected region (S82). Then, whenthe ratio of the area of the calculated selected region to the area ofthe character region exceeds a threshold (YES in S83), the selectedcharacter specification program PR specifies the selected candidatecharacter as a selected character (S84). When the ratio is less than thethreshold (NO in S83), the selected character specification program PRspecifies the selected candidate character as a non-selected character(S85).

Specific Example Plurality of Strokes

FIG. 20A and FIG. 20B are diagrams each illustrating a specific exampleof a plurality of strokes and a selected region. FIG. 20A and FIG. 20Bare two case examples each illustrating a plurality of strokes and aselected region.

Specific Example A

In the example of FIG. 20A, since two strokes s13 do not cross the upperside of the character region of the selected candidate character “ten(in Japanese language expression)” j201 (NO in S92 of FIG. 19), thecoordinates of points a51 and a52 of the uppermost ends of the twostrokes s13 are stored (S94 of FIG. 19). In addition, since the twostrokes s13 cross the lower side of the character region (YES in S97 ofFIG. 19), the coordinates of crossing points a42 and a49 between the twostrokes s13 and the lower side of the character region are stored (S98of FIG. 19).

Then, a polygonal region A4-1 is generated as a selected region based onthe upper and lower points a51, a52, a42, and a49 of the two strokes s13and apexes a41, a43, a48, and a50 of the character region. Specifically,the apex a41, the apex a43, the apex a48, the apex a50, the point a51 ofa first uppermost end, the point a52 of a second uppermost end, and theapex a41 are, for example, connected together. Note that since thepoints a42 and a49 of the lowermost ends are positioned on the extensionof a line segment connecting the apexes a43 and a48 together, they areomitted in this example.

In the example of FIG. 20A, since the two strokes s13 cross the upperside of the character region of the selected candidate character “ki (inJapanese language expression)” j202 (YES in S92 of FIG. 19), thecoordinates of the crossing point a42 and a49 between the two strokess13 and the upper side of the character region are stored (S93 of FIG.19). In addition, since the two strokes s13 do not cross the lower sideof the character region (NO in 97 of FIG. 19), the coordinates of pointsa45 and a46 of the lowermost ends of the two strokes s13 are stored (S99of FIG. 19).

Then, a polygonal region A4-2 is generated as a selected region based onthe upper and lower points a42, a49, a45, and a46 of the two strokes s13and apexes a43, a44, a47, and a48 of the character region. Specifically,the apex a43, the apex a44, the point a45 of a first lowermost end, thepoint a46 of a second lowermost end, the apex a47, the apex a48, and theapex a43 are, for example, connected together. Note that since thepoints a42 and a49 of the uppermost ends are positioned on the extensionof a line segment connecting the apexes a43 and a48 together, they areomitted in this example.

Specific Example B

In the example of FIG. 20B, since two strokes s14 do not cross the upperside of the character region of the selected candidate character “ten(in Japanese language expression)” j203 (NO in S92 of FIG. 19), thecoordinates of points b52 and b50 of the uppermost ends of the twostrokes s14 are stored (S94 of FIG. 19). In addition, since the twostrokes s14 cross the lower side of the character region (YES in S97 ofFIG. 19), the coordinates of crossing points b42 and b49 between the twostrokes s14 and the lower side of the character region are stored (S98of FIG. 19). Then, a polygonal region B4-1 is generated as a selectedregion based on the upper and lower points b52, b50, b42, and b49 of thetwo strokes s14 and apexes b41, b43, b48, and b51 of the characterregion.

In the example of FIG. 20B, since the two strokes s14 cross the upperside of the character region of the selected candidate character “ki (inJapanese language expression)” j204 (YES in S92 of FIG. 19), thecoordinates of the crossing point b42 and b49 between the two strokess14 and the upper side of the character region are stored (S93 of FIG.19). In addition, since the two strokes s14 do not cross the lower sideof the character region of the selected candidate character “ki (inJapanese language expression)” j204 (NO in 97 of FIG. 19), thecoordinates of points b44 and b47 of the leftmost ends of the twostrokes s14 are stored (S99 of FIG. 19). Note that in a case in whichthe two strokes s14 cross the left side or the right side of thecharacter region at this time, the coordinates of the crossing pointbetween the two strokes s14 and the left side or the right side of thecharacter region are stored. Then, a polygonal region B4-2 is generatedas a selected region based on the upper and lower points b42, b49, b44,and b47 of the two strokes s14 and apexes b43, b45, b46, and b48 of thecharacter region.

As described above, even in a case in which a plurality of strokes isinput, the selected character specification program PR according to theembodiment is allowed to generate, as a selected region, the overlappedregion between a character region and a polygonal region formed byconnecting together and the uppermost, lowermost, leftmost, andrightmost points of one or a plurality of strokes in the characterregion and the apexes of the character region. Thus, as illustrated inFIG. 20A, even in a case in which short strokes are designated in arectangle region including a plurality of strokes, it is possible togenerate a large selected region. In addition, as illustrated in FIG.20B, it is possible to select characters based on strokes thatfacilitate the imagination of the area of a rectangle region including aplurality of strokes. Thus, a user is allowed to efficiently select oneor a plurality of successive characters easily and more intuitivelybased on short strokes.

(Another Generation Example of Selected Region)

FIG. 21A and FIG. 21B are diagrams each illustrating another generationexample of a selected region. FIG. 21A and FIG. 21B are two caseexamples each illustrating the stroke of a curved line or a broken lineand a selected region. In the examples, circumscribed rectangles A5 eand B5 e of strokes are generated, and selected regions are generatedbased on the apexes of the circumscribed rectangles A5 e and B5 e or thecrossing points between the circumscribed rectangles A5 e and B5 e andthe sides of character regions EE and the apexes of the characterregions EE.

Specific Example A

In the example of FIG. 21A, the rectangle A5 e circumscribing a strokes11 is generated. Then, about the selected candidate character “ten (inJapanese language expression)” j211 points a61 and a71 of both ends ofthe upper side of the circumscribed rectangle A5 e and crossing pointsa63 and a69 between the circumscribed rectangle A5 e and the side of thecharacter region EE are stored. Consequently, a polygonal region A5-1 isgenerated as a selected region based on the points a61, a71, a63, anda69 of the circumscribed rectangle A5 e and apexes a61, a64, a70, anda72 of the character region EE. In addition, about the selectedcandidate character “ki (in Japanese language expression)” j212 thecrossing points a63 and a69 between the circumscribed rectangle A5 e andthe side of the character region EE and crossing points a66 and a67between the circumscribed rectangle A5 e and the side of the characterregion EE are stored. Consequently, a polygonal region A5-2 is generatedas a selected region based on the points a63, a69, a66, and a67 of thecircumscribed rectangle A5 e and the apexes a64, a65, a68, and a70 ofthe character region EE.

Specific Example B

In the example of FIG. 21B, the rectangle B5 e circumscribing a strokes12 is generated. Then, about the selected candidate character “ten (inJapanese language expression)” j213 points b62 and b71 of both ends ofthe upper side of the circumscribed rectangle B5 e and crossing pointsb63 and b70 between the circumscribed rectangle B5 e and the side of thecharacter region EE are stored. Consequently, a polygonal region B5-1 isgenerated as a selected region based on the points b62, b71, b63, andb70 of the circumscribed rectangle B5 e and apexes b61, b64, b69, andb72 of the character region EE. In addition, about the selectedcandidate character “ki (in Japanese language expression)” j214 thecrossing points b63 and b69 between the circumscribed rectangle B5 e andthe side of the character region EE and points b65 and b68 of both endsof the lower side of the circumscribed rectangle B5 e are stored.Consequently, a polygonal region B5-2 is generated as a selected regionbased on the points b63, b69, b65, and b68 of the circumscribedrectangle B5 e and apexes b64, b66, b67, and b69 of the character regionEE.

Note that a method of generating a selected region in FIG. 21A and FIG.21B may be applied to a case in which a plurality of strokes isdesignated as illustrated in FIG. 20A and FIG. 20B. The selectedcharacter specification program PR generates, as a selected region, theoverlapped region between a character region and a polygonal regionformed by connecting together the circumscribed rectangle region of theuppermost, lowermost, leftmost, and rightmost points of a plurality ofstrokes and the apexes of the character region.

As described above, the selected character specification program PR maygenerate, as a selected region, the overlapped region between acharacter region and a polygonal region formed by connecting togetherthe circumscribed rectangle region of the uppermost, lowermost,leftmost, and rightmost points of a stroke and the apexes of thecharacter region (S22 of FIG. 9). Then, the selected characterspecification program PR specifies one or a plurality of successivecharacters, in which the ratio of the area of the selected region to thearea of the character region exceeds a threshold, as selected characters(S23 and S24 of FIG. 9). Thus, the selected character specificationprogram PR is allowed to generate a larger selected region with a shortstroke. Therefore, a user is allowed to efficiently select one or aplurality of successive characters more intuitively and more accuratelybased on the strokes of one or a plurality of curved lines, brokenlines, or the like.

Note that the selected character specification program PR according tothe embodiment may generate, as a selected region, the overlapped regionbetween a character region and the circumscribed rectangle region of theuppermost, lowermost, leftmost, and rightmost points of a stroke. Inthis case, the circumscribed rectangles A5 e and B5 e of the strokes s11and s12 in FIG. 21A and FIG. 21B are, for example, generated as selectedregions (S22 of FIG. 9). Then, for example, when the ratios of the areasof the circumscribed rectangles A5 e and B5 e of the strokes to theareas of the character regions EE exceed a threshold, the selectedcharacter specification program PR specifies the selected candidatecharacters as selected characters (S23 and S24 of FIG. 9). Thus, a useris allowed to select one or a plurality of successive characters moreintuitively while imagining an area corresponding to the circumscribedrectangle of a stroke.

(Correction Processing of Selected Characters)

As described in the flowchart of FIG. 6B, the selected characterspecification program PR performs, for example, the correctionprocessing of characters (S15 of FIG. 6B) after the selected characterspecification processing (S14 of FIG. 6B). Specifically, in a case inwhich selected characters include characters that do not constitutewords at the beginning or the end thereof, the selected characterspecification program PR removes, for example, the characters as thecorrection processing.

At selecting characters displayed on the screen of the terminal, one ora plurality of words is generally selected. Accordingly, in a case inwhich selected characters include characters that do not constitutewords at the beginning or the end thereof, it is assumed that thecharacters have been erroneously selected. Therefore, the selectedcharacter specification program PR removes, for example, the selectedcharacters that do not constitute words to correct the erroneousselection of the characters. Thus, since characters desired by a userare highly likely to be specified as selected characters, the selectedcharacter specification program PR performs the selection processing ofcharacters more accurately.

In the correction processing, the word-by-word-basis information of adisplayed character string based on the morpheme analysis processing is,for example, used. As described in the flowchart of FIG. 6A, theselected character specification program PR performs, for example, themorpheme analysis processing of a displayed character string.

FIG. 22 is a diagram illustrating the morpheme analysis processing of acharacter string. In the table Dh of FIG. 22, the displayed characterstring “Kyou ha Totemo Tenki ga (in Japanese language expression)”j221-j225 is, for example, illustrated. The displayed character string“Kyou ha Totemo Tenki ga (in Japanese language expression)” is segmentedinto, for example, the words “Kyou” j221, “wa” j222, “Totemo” j223,“Tenki” j224, and “ga” j225 based on the morpheme analysis processing.Specifically, the word “Kyou” j221 represents a noun, the word “ha” j222represents a postposition, the word “Totemo” j223 represents a prenounadjectival, the word “Tenki” j224 represents a noun, and the word “ga”j225 represents a postposition.

The selected character specification program PR illustrates, forexample, the displayed character string “Kyou ha Totemo Tenki ga Yoidesu. Asu ha Ame ga Furisou desu (in Japanese language expression): Itis a very good weather today. It seems to rain tomorrow (in Englishlanguage expression).” is, for example, illustrated. When the selectedcharacters “Tenki ga yo (in Japanese language expression)” arespecified, the selected character “yo (in Japanese language expression)”does not constitute a word in this example. Therefore, the selectedcharacter specification program PR corrects the selected characters“Tenki ga yo (in Japanese language expression)” into the selectedcharacters “Tenki ga (in Japanese language expression)” as thecorrection processing. As another specific example, when the selectedcharacters “Asu ha Ame ga Furisou de (in Japanese language expression)”are, for example, specified, the selected character specificationprogram PR corrects the selected characters “Asu ha Ame ga Furisou de(in Japanese language expression)” into the selected characters “Asu haAme ga Furisou (in Japanese language expression)”.

Note that in a case in which selected characters include characters thatdo not constitute words at the beginning or the end thereof, theselected character specification program PR may add a character so thatthe selected characters constitute words. Specifically, when theselected characters “Asu ha Ame ga Furisou de (in Japanese languageexpression)” are, for example, specified, the selected characterspecification program PR may correct the selected characters “Asu ha Amega Furisou de (in Japanese language expression)” into the selectedcharacters “Asu ha Ame ga Furisou desu (in Japanese languageexpression)” based on the correction processing.

Modified Example

FIG. 23 is a diagram illustrating a modified example of the selectedcharacter specification processing. The selected character specificationprogram PR may apply the selected character specification processingaccording to the embodiment to, for example, objects such as tables,graphs, and figures, besides characters. In this case, as illustrated inFIG. 23, the selected character specification program PR detects displayregions EF1 and EF2 (corresponding to the character regions) of a tableOb1 and a figure Ob2 as displayed objects, respectively. Then, theselected character specification program PR performs the specificationprocessing of selected objects based on a stroke s20 and the displayregions EF1 and EF2.

Specifically, the selected character specification program PR determinesobjects such as a figure and a graph overlapped with the stroke s20 asselected candidate objects. Next, the selected character specificationprogram PR generates a selected region based on the stroke s20 and thedisplay regions EF1 and EF2 for each of the selected candidate objects.A selected region is generated in the same manner as when a selectedcharacter is specified. For example, the selected characterspecification program PR calculates a selected region A20 based on thecrossing points between the stroke s20 and the display region EF1, theupper, lower, left, and right points of the stroke s20 inside thedisplay region EF1, the apexes of the display region EF1, or the like.Then, when the ratio of the area of the selected region A20 to the areaof the display region EF1 exceeds a threshold, the selected characterspecification program PR specifies the selected region A20 as a selectedobject.

As described above, the selected character specification program PRaccording to the embodiment is applicable also not only to the selectionprocessing of characters but also to the selection processing ofobjects. Thus, the selected character specification program PR makes itpossible to easily specify one or a plurality of successive selectedcharacters and objects based on the stroke of a closed curved line orthe strokes of one or a plurality of curved lines or broken lines. Thus,a user is allowed to efficiently select one or a plurality of successivecharacters and objects more intuitively and more accurately based on asimple stroke.

The selected character specification processing of the selectedcharacter specification program PR according to the embodiment includesdetecting a character region indicating a region, in which eachcharacter of a displayed character string is displayed on a screen,based on character string display information including the position ofthe first character of the displayed character string, the charactersize of each character of the displayed character string, and the spacebetween lines of the displayed character strings, specifying a stroke ofa closed curved line designated on the screen based on input operationinformation, and specifying a selected character. In the specifying theselected character, one or a plurality of successive characters, inwhich the ratio of the area of a selected region based on the uppermost,lowermost, leftmost, and rightmost points of the stroke of the closedcurved line in the character region to the area of the character regionexceeds a threshold, is specified as selected character among arespective character of the displayed character string overlapped withthe stroke of the closed curved line.

As described above, the selected character specification program PRaccording to the embodiment makes it possible to easily specify one or aplurality of successive selected characters based on the stroke of aclosed curved line surrounding a character as a selected object. Inaddition, the selected character specification program PR specifies aselected character according to the ratio of the area of a selectedregion based on the uppermost, lowermost, leftmost, and rightmost pointsof the stroke of a closed curved line in a character region to the areaof the character region, whereby only a character as a selected objectmay be specified as a selected character even in a case in which thestroke is overlapped with a character as a non-selected object. Inaddition, the stroke of a closed curved line facilitates the intuitiveimagination of a corresponding area region. Therefore, a user is allowedto select one or a plurality of successive characters more intuitivelyand more accurately based on the simple stroke of a closed curved line.Thus, the selected character specification program PR makes it possibleto perform the selection processing of characters more efficiently.

In addition, the selected character specification program PR accordingto the embodiment may be provided as middleware. Therefore, eachapplication operating on an OS uses the interface of the selectedcharacter specification program PR according to the embodiment and isthus allowed to implement the selection processing of characters moreefficiently without being limited to the function of the characterselection program of the OS. Moreover, since the selected characterspecification program PR is allowed to detect the display region of eachcharacter based on character string display information, it may beunnecessary for the selected character specification program PR tomaintain the coordinate information of the character regions of all thecharacters. Therefore, it is possible for the selected characterspecification program PR to reduce the amount of data relating to thecharacter region of each character.

In the selected character specification processing according to theembodiment, a selected region represents the overlapped region between acharacter region and an internal region inscribed in the uppermost,lowermost, leftmost, and rightmost points of a stroke. Alternatively, inthe selected character specification processing according to theembodiment, a selected region represents the overlapped region between acharacter region and a polygonal region formed by connecting togetherthe uppermost, lowermost, leftmost, and rightmost points of a stroke.Thus, the selected character specification program PR is allowed toeasily calculate a selected region based on the stroke of a closedcurved line. In addition, since a selected region corresponds to therange of a closed curved line, a user is allowed to select one or aplurality of successive characters more intuitively while imagining theregion of an area corresponding to the closed curved line.

The selected character specification processing of the selectedcharacter specification program PR according to the embodiment includesdetecting a character region indicating a region, in which eachcharacter of a displayed character string is displayed on a screen,based on character string display information including the position ofthe first character of the displayed character string, the charactersize of each character of the displayed character string, and the spacebetween lines of the displayed character strings, specifying one or aplurality of strokes designated on the screen based input operationinformation, and specifying a selected character. In the specifying theselected character, one or a plurality of successive characters, inwhich the ratio of the area of a selected region based on the uppermost,lowermost, leftmost, and rightmost points of the one or the plurality ofstrokes in the character region to the area of the character regionexceeds a threshold, is specified as selected character among arespective character of the displayed character string overlapped withthe one or the plurality of strokes.

As described above, the selected character specification program PRaccording to the embodiment makes it possible to easily specify one or aplurality of successive selected characters based on one or a pluralityof strokes. In addition, the selected character specification program PRspecifies a selected character according to the ratio of the area of aselected region based on the uppermost, lowermost, leftmost, andrightmost points of one or a plurality of strokes in a character regionto the area of the character region, whereby only a character as aselected object may be specified as a selected character even in a casein which the stroke is overlapped with a character as a non-selectedobject. Therefore, a user is allowed to select one or a plurality ofsuccessive characters more intuitively and more accurately based on oneor a plurality of strokes. Thus, the selected character specificationprogram PR makes it possible to perform the selection processing ofcharacters more efficiently.

In addition, the selected character specification program PR accordingto the embodiment is provided as middleware. Therefore, each applicationoperating on an OS uses the interface of the selected characterspecification program PR according to the embodiment and is thus allowedto perform the selection processing of characters more efficientlywithout being limited to the function of the character selection programof the OS. Moreover, since the selected character specification programPR is allowed to detect the display region of each character based oncharacter string display information, it may be unnecessary for theselected character specification program PR to maintain the coordinateinformation of the character regions of all the characters. Therefore,it is possible for the selected character specification program PR toreduce the amount of data relating to the character region of eachcharacter.

In the selected character specification processing according to theembodiment, a stroke represents one of a curved line, a broken line, anda straight line, and a selected region represents the overlapped regionbetween a character region and a polygonal region formed by connectingtogether the uppermost, lowermost, leftmost, and rightmost points of thestroke and the apexes of the character region. Thus, the selectedcharacter specification program PR is allowed to easily calculate aselected region based on the stroke of a curved line, a broken line, ora straight line. In addition, since a selected region is generated basedon a polygonal region formed by connecting together the uppermost,lowermost, leftmost, and rightmost points of a stroke and the apexes ofa character region, the selected character specification program PR isallowed to generate a larger selected region with a short stroke. Thus,a user is allowed to easily select characters with a short stroke.

In the selected character specification processing according to theembodiment, a stroke represents one of a curved line, a broken line, anda straight line, and a selected region represents the overlapped regionbetween a character region and a polygonal region formed by connectingtogether the circumscribed rectangle region of the uppermost, lowermost,leftmost, and rightmost points of a stroke and the apexes of thecharacter region. Thus, the selected character specification program PRis allowed to easily calculate a selected region based on the stroke ofa curved line, a broken line, or a straight line. In addition, since aselected region is generated based on a polygonal region formed byconnecting together the circumscribed rectangle region of the uppermost,lowermost, leftmost, and rightmost points of a stroke and the apexes ofa character region, the selected character specification program PR isallowed to generate a large selected region with a shorter stroke. Thus,a user is allowed to easily select characters with a short stroke.

In the selected character specification processing according to theembodiment, a stroke represents one of a curved line, a broken line, anda straight line, and a selected region represents the overlapped regionbetween a character region and the circumscribed rectangle region of theuppermost, lowermost, leftmost, and rightmost points of a stroke. Thus,the selected character specification program PR is allowed to easilycalculate a selected region based on the stroke of a curved line, abroken line, or a straight line. In addition, since a selected regioncorresponds to the circumscribed rectangle region of a stroke, a user isallowed to select one or a plurality of successive characters moreintuitively while imagining the circumscribed rectangle region of thestroke.

The selected character specification processing according to theembodiment further includes segmenting the specified selected charactersinto words based on a morpheme analysis and removing one or a pluralityof characters that does not constitute words at the beginning or the endof the selected characters. Thus, even in a case in which selectedcharacters include characters that do not constitute words at thebeginning or the end thereof due to the erroneous selection of thecharacters, the selected character specification program PR is allowedto remove the selected characters that do not constitute words tocorrect the erroneous correction of the characters. Thus, the selectedcharacter specification program PR is allowed to perform the selectionprocessing of characters more accurately.

In the selected character specification processing according to theembodiment, a displayed character string includes decorated characters,character string display information further includes the position ofthe decorated character, a character size of the decorated character,and space between lines of the decorated character, and a characterregion is detected for each character of a displayed character stringincluding decorated characters in the detecting the character region. Inaddition, decorated character represents any or both of a character towhich character size is expanded or reduced and character affixed asrubies. Thus, even in a case in which a displayed character stringincludes decorated characters, the selected character specificationprogram PR is allowed to detect the character region of each characterbased on character string display information. Therefore, it isunnecessary for the selected character specification program PR tomaintain the coordinate information of the character regions of allcharacters, and it is possible for the selected character specificationprogram to reduce the amount of data relating to the character region ofeach character.

All examples and conditional language provided herein are intended forthe pedagogical purposes of aiding the reader in understanding theinvention and the concepts contributed by the inventor to further theart, and are not to be construed as limitations to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although one or more embodiments of thepresent invention have been described in detail, it should be understoodthat the various changes, substitutions, and alterations could be madehereto without departing from the spirit and scope of the invention.

What is claimed is:
 1. A non-transitory computer-readable medium storinga selected character specification program that causes a computer toexecute a process comprising: detecting a character region indicating aregion, in which each character of the displayed character string isdisplayed on a screen; specifying a stroke of a closed curved linedesignated on the screen based on input operation information; andspecifying one or a plurality of successive characters, in which a ratioof an area of a selected region to an area of the character regionexceeds a threshold, the selected region representing a polygonal regionthat includes, as apexes, uppermost, lowermost, leftmost, and rightmostpoints in the character region of the stroke of the closed curved line,as selected character among a respective character of the displayedcharacter string overlapped with the stroke of the closed curved line.2. The non-transitory computer-readable medium storing the selectedcharacter specification program according to claim 1, wherein theselected region further represents a region overlapped between thecharacter region and an internal region inscribed in the uppermost,lowermost, leftmost, and rightmost points of the stroke.
 3. Thenon-transitory computer-readable medium storing the selected characterspecification program according to claim 1, wherein the process furthercomprises segmenting the specified selected characters into words basedon a morpheme analysis and removing one or a plurality of characters,each of which does not constitute a word, at a beginning or an end ofthe selected characters from the selected characters.
 4. Thenon-transitory computer-readable medium storing the selected characterspecification program according to claim 1, wherein the detecting thecharacter region based on character string display information includesa position of a first character of the displayed character string, acharacter size of each character of the displayed character string, andspace between lines of displayed character strings.
 5. Thenon-transitory computer-readable medium storing the selected characterspecification program according to claim 4, wherein the displayedcharacter string includes a decorated character, the character stringdisplay information further includes a position of the decoratedcharacter, a character size of the decorated character, and spacebetween lines of the decorated character, and the character region isdetected for each character of the displayed character string includingthe decorated character in the detecting the character region.
 6. Thenon-transitory computer-readable medium storing the selected characterspecification program according to claim 5, wherein the decoratedcharacter represents one or both of a character to which character sizeis expanded or reduced and a character affixed with a ruby.
 7. Anon-transitory computer-readable medium storing a selected characterspecification program that causes a computer to execute a processcomprising: detecting a character region indicating a region, in whicheach character of the displayed character string is displayed on ascreen; specifying one or a plurality of strokes designated on thescreen based on input operation information; and specifying one or aplurality of successive characters, in which a ratio of an area of aselected region to an area of the character region exceeds a threshold,the selected region representing a polygonal region that includes, asapexes, apexes of the character region and uppermost, lowermost,leftmost, and rightmost points in the character region of the one or theplurality of strokes, as selected character among a respective characterof the displayed character string overlapped with the one or theplurality of strokes.
 8. The non-transitory computer-readable mediumstoring the selected character specification program according to claim7, wherein the stroke represents any of a curved line, a broken line,and a straight line, and the selected region further represents anoverlapped region between the character region and a circumscribedrectangle region of the uppermost, lowermost, leftmost, and rightmostpoints of the stroke.
 9. A selected character specification devicecomprising: a memory; and a processor coupled to the memory andconfigured to execute a process including; detecting a character regionindicating a region, in which each character of the displayed characterstring is displayed on a screen; specifying a stroke of a closed curvedline designated on the screen based on input operation information; andspecifying one or a plurality of successive characters, in which a ratioof an area of a selected region to an area of the character regionexceeds a threshold, the selected region representing a polygonal regionthat includes, as apexes, uppermost, lowermost, leftmost, and rightmostpoints in the character region of the stroke of the closed curved line,as selected character among a respective character of the displayedcharacter string overlapped with the stroke of the closed curved line.10. A non-transitory computer-readable medium storing a selectedcharacter specification program that causes a computer to execute aprocess comprising: detecting a character region indicating a region, inwhich each character of the displayed character string is displayed on ascreen; specifying one or a plurality of strokes designated on thescreen based on input operation information; and specifying one or aplurality of successive characters, in which a ratio of an area of aselected region to an area of the character region exceeds a threshold,the selected region representing a polygonal region that includes, asapexes, apexes of the character region and apexes of a circumscribedrectangle region of uppermost, lowermost, leftmost, and rightmost pointsin the character region of the one or the plurality of strokes, as aselected character among a respective character of the displayedcharacter string overlapped with the one or the plurality of strokes.